#ifndef CRC8_H
#define CRC8_H

//extern unsigned char crc8_table[256]; /* 8-bit crc table */
#if 0
static inline unsigned char _crc8(unsigned char *crc, unsigned char c)
{
    return ((*crc = crc8_table[*crc ^ c]) & 0xFF);
}
#endif
//#define CRC8(CRC, C)  ((CRC = crc8_table[CRC ^ C]) & 0xFF)

uint8_t crc8(uint8_t crc, const char *s, int l);
uint8_t crc8_file(char *filename, unsigned char *result);

#endif
